<div class="container_wrap">
    <!-- 
    <h2 class="section_tit">관리<span>설명</span></h2>
     -->
    
    <table width="100%">
    <tr>
        <td align="left" valign="top" width="300">
            
            <h2 class="section_tit" style="margin-bottom:10px;">팀 관리</h2>
            
            <table class="tbls" style="margin-bottom:10px; text-align:center;">
            <col width="*" />
            <col width="120" />
            <thead>
            <tr>
                <th>팀명</th>
                <th>비고</th>
            </tr>
            </thead>
            <tbody>
            <?php 
            $sHtml = '';
            for ($i = 0, $iLen = count($aTeamList); $i < $iLen; $i++) {
                $_row = $aTeamList[$i];
                
                $sHtml .= '<tr>';
                $sHtml .= '    <td><a href="./?c=mng&team_no='.$_row['team_no'].'">'.$_row['team_name'].'</a></td>';
                $sHtml .= '    <td><span class="button white small strong"><a href="javascript:;" onclick="Mng.modTeam(\''.$_row['team_no'].'\', \''.$_row['team_name'].'\');">수정</a></span> <span class="button white small strong"><a href="javascript:;" onclick="Mng.delTeam(\''.$_row['team_no'].'\');">삭제</a></span></td>';
                $sHtml .= '</tr>';
            }
            echo $sHtml;
            ?>
            </tbody>
            </table>
            
            <div>
                <form name="regTeamForm" id="regTeamForm" method="post" onsubmit="Mng.regTeam(); return false;">
                <input type="hidden" name="modeTeam" id="modeTeam" value="" />
                <input type="hidden" name="team_no" id="team_no" value="" />
                <input type="text" name="team_name" id="team_name" value="" class="input wd200" /> 
                <span class="button black small strong"><button type="submit">등록</button></span>
                </form>
            </div>
            
        </td>
        <td style="width:10px;"></td>
        <td valign="top">
        
            <h2 class="section_tit" style="margin-bottom:10px;">팀원 관리 <span class="button black small strong"><a href="javascript:;" onclick="Mng.viewRegMember();">팀원등록</a></span></h2>
            
            <table class="tbls style1" style="text-align:center;">
            <col width="" />
            <col width="70" />
            <col width="" />
            <col width="" />
            <col width="120" />
            <thead>
            <tr>
                <th>팀명</th>
                <th>이름</th>
                <th>아이디</th>
                <th>이메일</th>
                <th>비고</th>
            </tr>
            </thead>
            <tbody>
            <?php
            $sHtml = '';
            for ($i = 0, $iLen = count($aTeamMemberList); $i < $iLen; $i++) {
                $_row = $aTeamMemberList[$i];
                
                $sHtml .= '<tr>';
                $sHtml .= '    <td>'.$aTeamInfo[$_row['team_no']].'</td>';
                $sHtml .= '    <td>'.$_row['member_name'].'</td>';
                $sHtml .= '    <td>'.$_row['member_id'].'</td>';
                $sHtml .= '    <td>'.$_row['member_email'].'</td>';
                $sHtml .= '    <td><span class="button white small strong"><a href="javascript:;" onclick="Mng.modMember(this);" data="2|1|김형민|gudals|gudals@gmail.com|9">수정</a></span> <span class="button white small strong"><a href="#">삭제</a></span></td>';
                $sHtml .= '</tr>';
            }
            echo $sHtml;
            ?>
            </tbody>
            </table>
            
        </td>
    </tr>
    </table>
</div>

<!-- 팀원 등록 폼 -->
<div id="dialog_reg_member" title="팀원 등록" style="padding:10px; display:none;">

    <form name="regMemberForm" id="regMemberForm" method="post" onsubmit="Mng.regTeamMember(); return false;">
    <input type="hidden" name="modeMember" id="modeMember" value="" />
    <input type="hidden" name="member_no" id="member_no" value="" />
    
    <table class="tbls">
    <col width="100" />
    <col width="*" />
    <tr>
        <th>팀</th>
        <td>
            <select name="m_team_no" id="m_team_no">
            <option value="">:팀</option>
            <?php 
            for ($i = 0, $iLen = count($aTeamList); $i < $iLen; $i++) {
                $_row = $aTeamList[$i];
                
                echo '<option value="'.$_row['team_no'].'">'.$_row['team_name'].'</option>';
            }
            ?>
            </select>
        </td>
    </tr>
    <tr>
        <th>이름</th>
        <td><input type="text" name="member_name" id="member_name" value="" class="input" /></td>
    </tr>
    <tr>
        <th>아이디</th>
        <td><input type="text" name="member_id" id="member_id" value="" class="input" /></td>
    </tr>
    <tr>
        <th>비밀번호</th>
        <td><input type="password" name="member_pass" id="member_pass" value="" class="input wd100" /> / <input type="password" name="check_member_pass" id="check_member_pass" value="" class="input wd100" /></td>
    </tr>
    <tr>
        <th>이메일</th>
        <td><input type="text" name="member_email" id="member_email" value="" class="input wd250" /></td>
    </tr>
    <tr>
        <th>레벨</th>
        <td>
            <select name="member_level" id="member_level">
            <option value="">:레벨</option>
            <?php 
            for ($i = 1; $i < 10; $i++) {
                echo '<option value="'.$i.'">'.$i.'</option>';
            }
            ?>
            </select>
        </td>
    </tr>
    </table>
    
    <div style="margin-top:10px; text-align:center;">
        <span class="button black large strong"><button type="submit">등록</button></span> 
        <span class="button white large strong"><a href="javascript:;" onclick="$('#dialog_reg_member').dialog('close');">취소</a></span>
    </div>
    
    </form>
   
</div>